package com.magicborrow.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;


import com.magicborrow.R;

/**
 * Created by Administrator on 2016/5/15.
 */
public class IntercalateActivity extends BaseActivity implements View.OnClickListener{

    private RelativeLayout modifypassword;
    private RelativeLayout bindphone;
    private RelativeLayout bindweixin;
    private RelativeLayout bindemil;
    private RelativeLayout clearcache;
    private ImageView iv_back;
    private Button exit;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_intercalate);
        initView();
        initListener();
    }

    private void initView(){
        modifypassword = (RelativeLayout)findViewById(R.id.modifypassword);
        bindphone = (RelativeLayout)findViewById(R.id.bindphone);
        bindweixin = (RelativeLayout)findViewById(R.id.bindweixin);
        bindemil = (RelativeLayout)findViewById(R.id.bindemil);
        clearcache = (RelativeLayout)findViewById(R.id.clearcache);
        iv_back = (ImageView)findViewById(R.id.iv_back);
        exit = (Button)findViewById(R.id.exit);
    }

    private void initListener(){
        modifypassword.setOnClickListener(this);
        bindemil.setOnClickListener(this);
        bindphone.setOnClickListener(this);
        bindweixin.setOnClickListener(this);
        iv_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        clearcache.setOnClickListener(this);
        exit.setOnClickListener(this);

    }

    public void onClick(View v){
        Intent intent = new Intent();
        switch (v.getId()){
            case R.id.modifypassword:
                intent.setClass(this,ModifyPasswordActivity.class);
                break;
            case R.id.bindphone:
                intent.setClass(this,NewPhoneActivity.class);
                break;
            case R.id.bindweixin:
                break;
            case R.id.bindemil:
                intent.setClass(this,BindMailboxActivity.class);
                break;
            case R.id.clearcache:

                break;
            case R.id.exit:

                break;

        }
        startActivity(intent);
    }

}
